import { BaseNode } from '@/apis/pcf/myModel/model/modelDetailModel';

export interface IBomProductListParams {
  enterpriseName?: string;
  productModelOrName?: string;
}

export interface IBomItemParams {
  nodeIdOrName?: string;
  supplierName?: string;
  auditStatus: string;
  productNo: string;
}

export interface IBomItemResult {
  productNo: string;
  nodeId: string;
  nodeNo: string;
  nodeType: string;
  nodeName: string;
  nodeFrName: string;
  nodeCode: string;
  parentId: string;
  quantity: string;
  dosage: string;
  unit: string;
  auditStatus: string;
  auditTime: string;
  supplierCode: string;
  supplierName: string;
  materialType: string;
  materialFlag: string;
  syncTime: string;
}
export interface IBomProductListItem {
  productNo: string;
  productId: string;
  productModel: string;
  productName: string;
  productDesc: string;
  weight: string;
  weightUnit: string;
  version: string;
  updater: string;
  dataModifyTime: string;
  partNum: string;
  enterpriseNo: string;
  enterpriseName: string;
  loading: boolean;
  syncStatus: string;
}

export interface IAddBomProduct {
  productNo?: string;
  productId: string;
  productModel: string;
  productName: string;
  productDesc: string;
  version: string;
  enterpriseNo: string;
  enterpriseName: string;
}

/**
 * 整合Bom树形结构 返回参数
 */
export interface GetBomProductTreeResult
  extends Omit<BaseNode, 'weight' | 'weightUnit' | 'dataType' | 'remark'> {
  supplierCode: string;
  parentNodeNo: string;
  hasChildren: boolean;
  isLeaf: boolean;
  version: string;
}
